Currently, an operator has increasingly more requirements for a captive portal, especially in a Wi-Fi terminal product, and a specific requirement may include the following. An operator requires that a portal site of the operator can be popped up after startup by a user, and then the user can surf the Internet normally; or after a user is in arrearage, a page, such as a recharge page or an arrearage reminder, is pushed to the user.
A second terminal receives an Internet access instruction, where the instruction may be a uniform resource locator (URL) address, for example, www.baidu.com; a Hypertext Transfer Protocol (http) request is sent to a network side according to the Internet access instruction; the network side returns a response packet to a first terminal; and the first terminal encapsulates the foregoing response packet into a captive portal packet customized by an operator, and sends the captive portal packet customized by the operator to the second terminal, so that the second terminal displays a captive portal page customized by the operator. However, when the second terminal runs an application and sends an http request to the first terminal, the first terminal cannot discriminate that the foregoing request is sent when the first terminal runs an application, thereby causing a problem that the second terminal cannot normally run the application and cannot display a captive portal page customized by an operator because a response packet that is returned for an http request sent to the first terminal when the application is run is mistakenly encapsulated into a captive portal packet customized by the operator, but a response packet that is returned for an http request sent when a browser is opened is not encapsulated.